﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HtmlCreateProgress.aspx.cs"
    Inherits="Manage_Cms_HtmlCreateProgress" %>

<html>
<head>
    <title></title>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
<%--    <meta http-equiv="refresh" content="3;url=HtmlCreateProgress.aspx?total=<%=total %>&current=<%=current %>&NodeIDCollectionToCreate=<%=KeRui.Common.PageRequest.GetString("NodeIDCollectionToCreate") %>">
--%></head>
<body>

    <script for="window" event="onload" language="JScript" type="text/javascript">
        var currentCount = <%=current %>;
        var count = <%=total %>;
        var errorMessage = '';

        if (errorMessage != '')
        {
	        //$('#uploadError').style.display = '';
	        $('#uploadWarning').hide();
	        $('#uploadErrorText').html(errorMessage);
        }
        else
        {
            if(currentCount>count)
            {
                currentCount=count;
            }
	        var width = parseInt(currentCount*350/count);
	        $('#prgressBarPercetage').html(parseInt(currentCount*100/count));
	        $('#progressBarBoxContent').width(width + 'px');
	        $('#uploadWarningText').html('(' + currentCount + '/' + count + ')');
        }
    </script>

    <div class="column">
        <div class="columntitle">
            生成</div><input type="hidden" name="siteid" value="<%=SiteID %>" />
        <table cellpadding="3" width="95%" align="center">
            <tr>
                <td>
                    <div id="progressBar" style="margin: 1em 2em 2em 2em;">
                        <div id="theMeter">
                            <div id="progressBarText" style="font-weight: bold; padding: 5px;">进度: <span id="prgressBarPercetage">0</span>%</div>
                            <div id="progressBarBox" style="width: 350px; height: 20px; border: 1px inset; background: #eee;">
                                <div id="progressBarBoxContent" style="width: 0; height: 20px; border-right: 1px solid #444;background: #9ACB34;"></div>
                            </div>
                        </div>
                    </div>
                    <div id="uploadError" style="position: relative; margin: 2em; display: none;">
                        <p style="padding-left: 25px; padding-bottom: 5px; color: red; text-align: left;
                            vertical-align: middle; background: url(../Pic/icon/error.jpg) no-repeat left top;">
                            执行出错，错误信息为：<br />
                            <span id="uploadErrorText"></span>
                        </p>
                    </div>
                    <div id="uploadWarning" style="position: relative; margin: 2em;">
                        <p style="padding-left: 25px; padding-bottom: 5px; text-align: left; vertical-align: middle;
                            background: url(../Pic/icon/warn.jpg) no-repeat left top;">
                            进度：<span id="uploadWarningText"></span>...<br />
                            任务完成前请不要离开此窗口，您可以打开新窗口进行其他操作！</p>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>
